package com.lingchen.entity;

import com.lingchen.utils.StringUtil;

import java.io.Serializable;

/**
 * Author    lingchen
 * Email     838878458@qq.com
 * Time      2018/2/26
 * Function  选择题
 */
public class Choice implements Serializable {
    /**
     * 题目id
     */
    private String id;
    /**
     * 科目id
     */
    private String courseId;
    /**
     * 内容
     */
    private String info;
    /**
     * A选项
     */
    private String a;
    /**
     * B选项
     */
    private String b;
    /**
     * C选项
     */
    private String c;
    /**
     * D选项
     */
    private String d;
    /**
     * 答案  A,B,C,D
     */
    private String answ;
    /**
     * 分析
     */
    private String analyze;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getA() {
        return a;
    }

    public void setA(String a) {
        this.a = a;
    }

    public String getB() {
        return b;
    }

    public void setB(String b) {
        this.b = b;
    }

    public String getC() {
        return c;
    }

    public void setC(String c) {
        this.c = c;
    }

    public String getD() {
        return d;
    }

    public void setD(String d) {
        this.d = d;
    }


    public String getAnsw() {
        return answ;
    }

    public int getAnswTag() {
        return StringUtil.getAnsw(answ);
    }

    public void setAnsw(String answ) {
        this.answ = answ;
    }

    public String getAnalyze() {
        return analyze;
    }

    public void setAnalyze(String analyze) {
        this.analyze = analyze;
    }

    @Override
    public String toString() {
        return "Choice{" +
                "id='" + id + '\'' +
                ", courseId='" + courseId + '\'' +
                ", info='" + info + '\'' +
                ", a='" + a + '\'' +
                ", b='" + b + '\'' +
                ", c='" + c + '\'' +
                ", d='" + d + '\'' +
                ", answ='" + answ + '\'' +
                ", analyze='" + analyze + '\'' +
                '}';
    }
}
